var mongoose = require('mongoose');
var materializedPlugin = require('mongoose-materialized');


var schema = new mongoose.Schema({
    // type:{type:Number},     // 0新闻分类，1产品分类 2上传分类......
    filedname:  String,
    originalname:  String,
    encoding:String,
    minetype:String,
    data:{type:Date,dafault:Date.now},
    destination:String,
    filename:String,
    path:String,
    size:Number

});

schema.plugin(materializedPlugin);

module.exports =  mongoose.model('Upload',  schema); // Model.paginate()